﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using System.Data.SqlClient;
using System.Web.Configuration;
using System.Security.Cryptography;
using System.Text;

namespace HiViLicenseManage
{
	public partial class Default : System.Web.UI.MasterPage
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated == false)
			{
				logAcc.Visible = false;
				adminFunction.Visible = false;
			}
			else
			{
				logAcc.Visible = true;
				if (System.Web.HttpContext.Current.User.Identity.Name.ToUpper() != "HIVI")
					adminFunction.Visible = false;
			}
		}

		protected void LoginState_LoggingOut(object sender, LoginCancelEventArgs e)
		{
			Session.Clear();
			Session.Abandon();
			Session.RemoveAll();
		}
	}
}
